////////////////////////////////////////////////////////////////////////////////

#ifndef _CONTACTLISTENER_H_
#define _CONTACTLISTENER_H_

////////////////////////////////////////////////////////////////////////////////

#ifndef _COMMONTYPES_H_
#include "commontypes.h"
#endif

#include "box2d.h"

////////////////////////////////////////////////////////////////////////////////


/** Box2D contact listener
*
*  @author   Anastasia Karpinska
*  @since    Apr 18th, 2010
*  @updated  Apr 18th, 2010
*/
class ContactListener : public b2ContactListener
{
////////////////////////////////////////////////////////////////////////////////

public:


    /** Constructor */
    ContactListener();


    /** Called when two fixtures begin to overlap */
    void BeginContact( b2Contact* _contact );


    /** Called when two fixtures cease to overlap */
    void EndContact( b2Contact* _contact );


    /**  Called after collision detection, but before collision resolution */
    void PreSolve( b2Contact* _contact, const b2Manifold* _oldManifold );


    /**  Called after collision resolution */
    void PostSolve( b2Contact* _contact, const b2ContactImpulse* _impulse );


////////////////////////////////////////////////////////////////////////////////

};

////////////////////////////////////////////////////////////////////////////////

#endif // _CONTACTLISTENER_H_
